package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the ACTOS_TITULO database table.
 * 
 */
@Embeddable
public class ActosTituloPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private long refnumTitu;
	private String codActo;
	private long nsActoTitu;

    public ActosTituloPK() {
    }

	@Column(name="REFNUM_TITU", unique=true, nullable=false)
	public long getRefnumTitu() {
		return this.refnumTitu;
	}
	public void setRefnumTitu(long refnumTitu) {
		this.refnumTitu = refnumTitu;
	}

	@Column(name="COD_ACTO", unique=true, nullable=false, length=5)
	public String getCodActo() {
		return this.codActo;
	}
	public void setCodActo(String codActo) {
		this.codActo = codActo;
	}

	@Column(name="NS_ACTO_TITU", unique=true, nullable=false, precision=5)
	public long getNsActoTitu() {
		return this.nsActoTitu;
	}
	public void setNsActoTitu(long nsActoTitu) {
		this.nsActoTitu = nsActoTitu;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof ActosTituloPK)) {
			return false;
		}
		ActosTituloPK castOther = (ActosTituloPK)other;
		return 
			(this.refnumTitu == castOther.refnumTitu)
			&& this.codActo.equals(castOther.codActo)
			&& (this.nsActoTitu == castOther.nsActoTitu);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.refnumTitu ^ (this.refnumTitu >>> 32)));
		hash = hash * prime + this.codActo.hashCode();
		hash = hash * prime + ((int) (this.nsActoTitu ^ (this.nsActoTitu >>> 32)));
		
		return hash;
    }
}